#pragma once 
#include "FileStream.h"

namespace Stasi
{
	class _declspec(dllexport) Log
	{
	private:
		IO::IO m_strm;
		std::vector<std::string> reports;
		std::vector<std::string> timestamp;
		time_t rawtime;
		struct tm * tminfo;
	public:
		Log()
		{
			if(!m_strm.N_StreamOUT("Log.txt"))
				throw std::exception("Cannot Create Log.txt");
		}
		~Log(){ m_strm.Close(); };

		Log& operator << (std::string input)
		{
			WriteStamp(input);
			return *this;
		}
		Log& operator >> (uint32 input)
		{
			int ret = static_cast<int>(input);
			m_strm.Write(ret);
			return *this;
		}

		Log& operator >> (std::string input)
		{
			Write(input);
			return *this;
		}

		void Write(std::string report);
		void Timestamp();
		void WriteStamp(std::string report);
		std::vector<std::string> CallReports()
		{
			return timestamp, reports;
		}
	};
}